Editor: Preload initial Site Editor canvas data#11766
Conversation
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the Core Committers: Use this line as a base for the props when committing in SVN: To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Test using WordPress PlaygroundThe changes in this pull request can previewed and tested using a WordPress Playground instance. WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser. Some things to be aware of
For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation. |
|
I think there is a strong chance the answer is yes. I will run some more tests and see what I can do. Appreciate your feedback. |
|
Thanks for asking whether there was room to preload more. I did a focused sweep of the remaining visible REST requests using the Homeboy Site Editor benchmark rig and REST waterfall diff tooling. What changed in the latest push:
Validated scenarios, with the extra route set matching the actual patch behavior (
The earlier 3-iteration default run with both added routes also reduced the full REST waterfall from I tested other visible routes too, but did not add them:
Tooling used:
Validation run locally:
|
|
LFG! 🚀 |
|
Was there a measurable impact on speed? The test runs I did found that some of the requests actually slowed down the overall load time when preloaded. There's a chance the harness was flawed in some way. Do you think the 6 requests that you couldn't get preloaded might point to something deeper worth investigating? This benchmark tooling is so fun to use, I'm happy to keep poking at things to see how fast we can make it without regressions. |
|
Well, I couldn't get all of them to be preloaded so I didn't go that far to measure. I was going to try measuring after all of the requests were preloaded. But if requests aren't in the critical rendering path, then indeed it doesn't make sense to preload since then it just slows down the page from being served. |
|
Follow-up from the remaining visible REST rows in DevTools: I traced the preloading middleware keys and caller stacks in Gutenberg, and the duplicate Tracked Gutenberg issues:
One diagnostics detail worth preserving: DevTools shows the post-middleware URL with That means this PR/backport should stay focused on predictable server-side Site Editor preload declarations. The remaining duplicate |
|
@westonruter Your experiments helped expose two upstream bugs: |





Summary
core/queryis present, and covers deterministic static-front-page requests.Trac ticket
https://core.trac.wordpress.org/ticket/65206
Gutenberg PR
WordPress/gutenberg#78075
Testing
php -l src/wp-admin/site-editor.phpgit diff --checkAI assistance